# docker build -t gosu/assets assets
#FROM alpine as gosu-assets
#COPY *.sh /opt/gosu/
#RUN set -x \
#    && apk add --no-cache --virtual .gosu-deps \
#		dpkg \
#		gnupg \
#		openssl \
#	&& /opt/gosu/gosu.download.sh \
#    && apk del .gosu-deps \
#    && rm /tmp/* -rf

# docker build -t centos:gosu .
FROM centos:7
LABEL maintainer "DailyNuts <containers@dailynuts.com>"

COPY --from=gosu/assets /opt/gosu /opt/gosu
RUN set -x \
    && /opt/gosu/gosu.install.sh \
    && rm -fr /opt/gosu

COPY prebuildfs /

RUN yum install -y net-tools curl which java-1.8.0-openjdk-headless  && \
    ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
    yum clean all -y && \
    rm -rf /var/cache/yum/*

ENV JAVA_HOME=/usr/lib/jvm/jre-1.8.0-openjdk/